package cn.msi.customer.action;

import cn.common.action.GeneralAction;
import cn.msi.customer.domain.ChkOrg;
import cn.msi.customer.service.ChkOrgService;

/**
 * 调研客户的组织机构请求Action类
 * 
 * @author Administrator
 * 
 */
public class ChkOrgAction extends GeneralAction {

	private static final long serialVersionUID = -3513403723188147938L;

	private ChkOrg chkOrg = new ChkOrg();

	private ChkOrgService chkOrgService;

	/**
	 * 客户组织机构列表查询请求方法
	 * 
	 * @throws Exception
	 */
	public void searchChkOrg() throws Exception {
		page(chkOrg);
		String json = chkOrgService.searchChkOrg(chkOrg);
		out(json);
	}
	
	/**
	 * 客户组织机构列表查询请求方法
	 * 
	 * @throws Exception
	 */
	public void selectChkOrg() throws Exception {
		page(chkOrg);
		if(q != null && !q.equals("")) {
			chkOrg.setChkOrgName(q);
		}
		String json = chkOrgService.searchChkOrg(chkOrg);
		out(json);
	}

	/**
	 * 客户组织机构编辑页面
	 * 
	 * @return
	 * @throws Exception
	 */
	public String findChkOrg() throws Exception {
		chkOrg = chkOrgService.findChkOrg(chkOrg);
		return SUCCESS;
	}

	/**
	 * 编辑客户组织机构信息
	 * 
	 * @throws Exception
	 */
	public void editChkOrg() throws Exception {
		chkOrgService.redactChkOrg(chkOrg);
	}

	/**
	 * 删除客户组织机构
	 * 
	 * @throws Exception
	 */
	public void deleteChkOrg() throws Exception {
		chkOrgService.deleteChkOrg(chkOrg);
	}

	public void setChkOrgService(ChkOrgService chkOrgService) {
		this.chkOrgService = chkOrgService;
	}

	public ChkOrg getChkOrg() {
		return chkOrg;
	}

	public void setChkOrg(ChkOrg chkOrg) {
		this.chkOrg = chkOrg;
	}

}
